import java.util.Date;
import java.text.*;
import java.util.logging.Level;
    import java.util.logging.Logger;

public class Avion
{
    private Date dateAchat;
    public Date getDateAchat()
    {
        return this.dateAchat;
    }
    public void setDateAchat(Date inDateAchat)
    {
        if (inDateAchat.after(dateFabrication))
            this.dateAchat = inDateAchat;
    }
    
    private int distance;
    public int getDistance()
    {
        return this.distance;
    }
    public void setDistance(int inDistance)
    {
        if (inDistance > 0)
            this.distance = inDistance;
    }
    
    private String matricule;
    public String getMatricule()
    {
        return this.matricule;
    }
    public void setMatricule(String inMatricule)
    {
        this.modele = inMatricule;
    }
    
    private String modele;
    public Date getModele()
    {
        return this.dateAchat;
    }
    public void setModele(String inModele)
    {
        this.modele = inModele;
    }
    
    private Date dateFabrication;
    public Date getDateFabrication()
    {
        return this.dateFabrication;
    }
    public void setDateFabrication(Date inDateFabrication)
    {
        if (dateAchat.after(inDateFabrication))
            this.dateFabrication = inDateFabrication;
    }
    
    private int capacite;
    public Date getCapacite()
    {
        return this.dateAchat;
    }
    public void setCapacite(String inCapacite)
    {
        this.modele = inCapacite;
    }
    
    private int nbreVoyage;
    public int getNbreVoyage()
    {
        return this.nbreVoyage;
    }
    public void setNbreVoyage(String inNbreVoyage)
    {
        this.modele = inNbreVoyage;
    }
    
    public Avion()
    {
        SimpleDateFormat dateStandard = new SimpleDateFormat("dd/MM/yyyy");
        try {
            dateAchat = dateStandard.parse("12/02/1999");
        } catch (ParseException ex) {
            Logger.getLogger(Avion.class.getName()).log(Level.SEVERE, null, ex);
        }
        try {
            dateFabrication = dateStandard.parse("12/02/1983");
        } catch (ParseException ex) {
            Logger.getLogger(Avion.class.getName()).log(Level.SEVERE, null, ex);
        }
        
    }
}